/**
 * 
 */
package com.cyou.qb.common.service.mock;

import java.util.ArrayList;
import java.util.List;

import org.springframework.stereotype.Component;

import com.cyou.fz173.util.JacksonUtil;
import com.cyou.nad.dao.PojoPage;
import com.cyou.nad.datastore.query.JdbcPage;
import com.cyou.qb.common.domain.Active;
import com.cyou.qb.common.domain.ActiveRule;
import com.cyou.qb.common.domain.QiangbaAdmin;
import com.cyou.qb.common.service.ActivityService;
import com.cyou.qb.constants.DBStoreConstants;
import com.cyou.qb.face.entity.NameValue;
import com.cyou.qb.system.ServiceContext;

/**
 * @author zoudongchao
 *
 */
@Component("ActivityServiceMock")
public class ActivityServiceMock implements ActivityService {

	private Active newOneActive(int activeId){
		Active active = new Active();
		active.setId(activeId);
		active.setAdminId(activeId);
		active.setActiveName("亲情大回馈");
		List<ActiveRule> ruleList = new ArrayList<ActiveRule>();
		
		//生成ActiveRule
		ActiveRule rule = new ActiveRule();
		rule.setIndex(0);
		rule.setType(DBStoreConstants.RULE_BASIC);
		rule.setValue(20);
		
		ruleList.add(rule);
		active.setRule(JacksonUtil.toJson(ruleList));
		
		return active;
	}
	
	/**
	 * mock数据<br>
	 */
	public Active findActivity(int activeId){
		return newOneActive(activeId);
	}
	/**
	 * 
	 */
	public ActivityServiceMock() {
	}

	/* (non-Javadoc)
	 * @see com.cyou.qb.service.BaseService#setServiceContext(com.cyou.qb.system.ServiceContext)
	 */
	@Override
	public void setServiceContext(ServiceContext serviceContext) {

	}

	/* (non-Javadoc)
	 * @see com.cyou.qb.service.BaseService#getServiceContext()
	 */
	@Override
	public ServiceContext getServiceContext() {
		return null;
	}

	/* (non-Javadoc)
	 * @see com.cyou.qb.common.service.ActivityService#saveOneActivity(java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, int, java.lang.String)
	 */
	@Override
	public int saveOneActivity(String activeNmae, String gameCode, String gameNmae, String gameType, String gameComOp,
			String gameComRd, String gameChannel, String gameNet, String gameBBS, String gameDown, String image1,
			String image2, String image2Link, String startTime, String endTime, String memo, String introduce,
			int adminId, String rule) {
		return 0;
	}

	/* (non-Javadoc)
	 * @see com.cyou.qb.common.service.ActivityService#removeActivity(java.util.List)
	 */
	@Override
	public int removeActivity(String activityId) {
		return 0;
	}






	/* (non-Javadoc)
	 * @see com.cyou.qb.common.service.ActivityService#getNameValue(int)
	 */


	/**
	 * Description
	 * @author lidongwei
	 * @since 2012-9-29 下午5:31:00
	 * @see TODOsome class
	 */
	@Override
	public int updateOneActivity(String activeId, String activeNmae, String gameCode, String gameNmae, String gameType,
			String gameComOp, String gameComRd, String gameChannel, String gameNet, String gameBBS, String gameDown,
			String image1, String image2, String image2Link, String startTime, String endTime, String memo,
			String introduce, String rule) {
		return 0;
	}

	/**
	 * Description
	 * @author lidongwei
	 * @since 2012-10-5 下午4:47:57
	 * @see TODOsome class
	 */
	@Override
	public void updatePublishAcitivity(String activityId) {
		
	}

	/**
	 * Description
	 * @author lidongwei
	 * @since 2012-10-6 上午11:30:57
	 * @see TODOsome class
	 */
	@Override
	public void updateCloseOpenActivity(String activityId) {
		
	}

	

	/**
	 * Description
	 * @author lidongwei
	 * @since 2012-10-7 下午2:51:47
	 * @see TODOsome class
	 */
	@Override
	public int findFaceStatus(String activityId) {
		return 0;
	}

	/**
	 * Description
	 * @author lidongwei
	 * @since 2012-10-8 下午1:44:33
	 * @see TODOsome class
	 */
	@Override
	public void updateRechargeGold(String acId, String gbNum, String accId,int accountId) throws Exception {
		
	}

	@Override
	public PojoPage<Active> pageQuery(String oderBy, int pageNo, int pageSize) {
		return null;
	}

	/**
	 * Description
	 * @author lidongwei
	 * @since 2012-10-12 下午5:07:17
	 * @see TODOsome class
	 */
	@Override
	public JdbcPage findPageQueryActivity(QiangbaAdmin admin, String state, String activityType, String activityName,
			int pageNo, int pageSize) throws Exception {
		return null;
	}

	@Override
	public List<Active> findEndedActivity(int days) {
		return null;
	}

	@Override
	public int updateActiveDrawNum(int id, long drawTimes) {
		return 0;
	}

	@Override
	public List<Active> findAllActive() {
		return null;
	}

	@Override
	public boolean checkPreview(int activityid) throws Exception {
		return true;
	}

	@Override
	public void freeServiceContextContext() {
		// TODO Auto-generated method stub
		
	}
}
